<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="font-awesome-4.5.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/selectize.css">
    <link rel="stylesheet" href="css/selectize.bootstrap3.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/wangEditor.min.css">
    <link rel="stylesheet" href="css/toastr.css">
    <style type="text/css">
    .content .main{margin-left:12%;width:80%;}
    th{text-align:right;}
    .pmtable td{padding-left:30px;}
    </style>
</head>
<body>
<?php 
$nav='admin';
include_once './view/_top.php';
?>

<div class="container-fluid content" id="content">
    <!-- ngView:  --><div ng-view="" class="ng-scope"><div class="container-fluid content ng-scope" id="content">
    <div class="sidebar">
        <ul class="nav nav-sidebar">
            <li id="b" class="active"><a href="?a=home">题库</a></li>
            
        </ul>
    </div>
     
    <div class=" main" style="min-width: 600px">
        <div class="main-cont">
            <div class="sub-header" style="margin-bottom: 10px;padding: 0px">
                <h4 style="width: 100px;margin-bottom: 0px;padding-bottom: 20px">项目</h4></div>
             <table class="pmtable" style="min-width: 600px">
                <tbody> 
                <tr>
                    <th>题目</th>
                    <td><input type="text" id="title" class="form-control" value="<?php echo $tiInfo['title']; ?>" ></td>
                    <td></td>
                </tr>
                <tr>
                    <th>答案</th>
                    <td><input type="text" id="dan" class="form-control" value="<?php echo $tiInfo['dan']; ?>" ></td>
                </tr>
                <tr>
                    <th>年级</th>
                    <td><select id="nianji" class="form-control">
					      <option value="3" <?php if (3 == $tiInfo['nianji']){ ?>selected="selected"<?php } ?>>三年级</option>
					      <option value="4" <?php if (4 == $tiInfo['nianji']){ ?>selected="selected"<?php } ?>>四年级</option>
                          <option value="5" <?php if (5 == $tiInfo['nianji']){ ?>selected="selected"<?php } ?>>五年级</option>  
					    </select>
					  </td>
                </tr>
                
                <tr>
                    <th>阶段</th>
                    <td><select id="step" class="form-control">
					      <option value="1" <?php if (1 == $tiInfo['step']){ ?>selected="selected"<?php } ?>>第一阶段</option>
					      <option value="2" <?php if (2 == $tiInfo['step']){ ?>selected="selected"<?php } ?>>第二阶段</option>
					      <option value="3" <?php if (3 == $tiInfo['step']){ ?>selected="selected"<?php } ?>>第三阶段</option>
					       
					    </select>
					  </td>
                </tr>
 
                <tr>
                    <th>选项A</th>
                    <td><input type="text" id="da" class="form-control" value="<?php echo $tiInfo['da']; ?>" ></td>
                </tr>
                <tr>
                    <th>选项B</th>
                    <td><input type="text" id="db" class="form-control" value="<?php echo $tiInfo['db']; ?>" ></td>
                </tr>
                <tr>
                    <th>选项C</th>
                    <td><input type="text" id="dc" class="form-control" value="<?php echo $tiInfo['dc']; ?>" ></td>
                </tr>
                <tr>
                    <th>选项D</th>
                    <td><input type="text" id="dd" class="form-control" value="<?php echo $tiInfo['dd']; ?>" ></td>
                </tr>
                <tr>
                    <th>选项E</th>
                    <td><input type="text" id="de" class="form-control" value="<?php echo $tiInfo['de']; ?>" ></td>
                </tr>
                <tr>
                    <th>选项F</th>
                    <td><input type="text" id="df" class="form-control" value="<?php echo $tiInfo['df']; ?>" ></td>
                </tr>
                 
                
            </tbody></table>
            <div class="hr-line-dashed"></div>
            <div style="width: 600px;text-align: right"><button id="remind" class="btn btn-success" ng-click="PMTsave(PMTcontent)">保存
            </button>
          
            </div>
        </div>
    </div>
    </div>


<div class="modal fade ng-scope" id="mymodal2">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p>是否删除该职位</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button data-toggle="modal" data-target="#mymodal3" type="button" class="btn btn-success" data-dismiss="modal">确定</button>
            </div>
        </div>

    </div>
</div>
</div>
</div>
<script src="js/jquery-2.2.4.min.js"></script>
<script src="js/toastr.js"></script>
<script src="js/easing.js"></script>
<script src="js/selectize.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/wangEditor.js"></script>
<script src="js/TileHeadPic.js"></script>
<script src="js/calendar.js"></script>
<script type="text/javascript">
$(function () {
    $('#remind').click(function () {
        toastr.options = {
            closeButton: false,
            debug: false,
            progressBar: false,
            positionClass: "toast-center",
            onclick: null,
            showDuration: "200",
            hideDuration: "1000",
            timeOut: "3000",
            extendedTimeOut: "1000",
            showEasing: "swing",
            hideEasing: "linear",
            showMethod: "fadeIn",
            hideMethod: "fadeOut"
        };
        var title=$("#title").val();
        var nianji=$("#nianji").val();
        var step=$("#step").val();
        var da=$("#da").val();
        var db=$("#db").val();
        var dc=$("#dc").val();
        var dd=$("#dd").val();
        var de=$("#de").val();
        var df=$("#df").val();
        var dan=$("#dan").val();

        if('' == title){
            var $toast = toastr['info']('请输入题目', '提示');
            return;
        }
        if('' == da){
            var $toast = toastr['info']('请输入选项A', '提示');
            return;
        }
        var $toast = toastr['info']('保存成功', '提示');

        $.post("?c=login&a=save&id=<?php echo $id; ?>", {title:title,step:step,nianji:nianji,
        	da:da, db:db,dc:dc,dd:dd,de:de,df:df,dan:dan}, function(data){
        	window.setTimeout(function(){
            	window.location.href="?a=home"; 
                }, 1000);
		 }, "json");
        
        
        
    });

})


function Aoo(obj) {
    $("mymodal2").modal("toggle");


}
$(function(){
    $('[data-toggle="tooltip"]').tooltip()
})
</script>
</body></html>